Skip to content

fix: project profile name shows stale value after editor save#10860

Open
BenJule wants to merge 3 commits into
bambulab:masterfrom
BenJule:fix/10769-profile-name-stale-after-save
Open

fix: project profile name shows stale value after editor save#10860
BenJule wants to merge 3 commits into
bambulab:masterfrom
BenJule:fix/10769-profile-name-stale-after-save

Conversation

@BenJule
Copy link
Copy Markdown

@BenJule BenJule commented May 21, 2026

Summary

After saving in the Project editor and navigating back to the index page, the Profile Name displays the original (pre-edit) value instead of the newly saved one.

Root cause: clear_model_info() empties m_last_payload during the save flow. When index.html loads and immediately sends request_3mf_info, C++ does nothing because m_last_payload is empty. The background on_reload() thread that holds the fresh data fires its RunScript callback while the webview is still navigating; the script is dropped and the page never receives the updated model data.

Fix: When request_3mf_info arrives with an empty m_last_payload, call update_model_data() to trigger a fresh reload. The resulting on_reload() dispatches the current (post-save) model data directly to the now-fully-loaded page.

Closes #10769

Changed file

  • src/slic3r/GUI/Project.cppOnScriptMessage / request_3mf_info handler

Test plan

  • Open a project → click Edit → change Profile Name → click Save
  • Profile Name on the index page reflects the newly saved value
  • Opening and re-saving updates the displayed name each time
  • Opening the editor after a save shows the correct (updated) Profile Name

BenJule added 3 commits May 21, 2026 10:52
The upstream build_all.yml only listed 'main' as a push trigger.
BenJule/BambuStudio uses 'master' as its default branch, so CI never
fired on fork-local pushes. Adding 'master' alongside 'main' makes
the full multi-platform build run when master is updated.
After saving in the editor, clear_model_info() empties m_last_payload.
If index.html loads and sends request_3mf_info before the background
on_reload() thread completes — or if on_reload()'s RunScript call is
dropped during webview navigation — the page receives no data and
continues to display the pre-save profile name.

Fall back to update_model_data() when request_3mf_info arrives with an
empty m_last_payload.  This triggers a fresh on_reload() which dispatches
the up-to-date model data directly to the now-loaded page.
@BenJule BenJule force-pushed the fix/10769-profile-name-stale-after-save branch from 6fd0da8 to 1a0f653 Compare May 21, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bambu Studio [Profile Name] ‘s display content is wrong 【配置名称】显示内容不正确

1 participant